package tech.aistar.util;

/**
 * 本类用来演示:
 *
 * @author jyz
 * @date 2023/3/11 20:05:30
 */

public class TelephoneFormat {
    /**
     * 效验手机格式是否正确
     * @param phone
     * @return
     */
    public static Boolean checkPhone(String phone){
        String phoneRegex = "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$";
        if(phone.matches(phoneRegex)){
            return true;
        }
        return false;
    }
}
